import * as GC from "@grapecity/spread-sheets";
import "@grapecity/spread-sheets-charts"
import "@grapecity/spread-sheets-print"
import "@grapecity/spread-sheets-resources-zh"
import "@grapecity/spread-sheets-pdf"
import "@grapecity/spread-sheets-barcode"
import "@grapecity/spread-sheets-io"
import "@grapecity/spread-sheets-languagepackages"
import "@grapecity/spread-sheets-shapes"
import "@grapecity/spread-sheets-tablesheet"
import "@grapecity/spread-sheets-pivot-addon"
import "@grapecity/spread-sheets-reportsheet-addon"
import "@grapecity/spread-sheets-designer-resources-cn"
import "@grapecity/spread-sheets-designer"

GC.Spread.Common.CultureManager.culture("zh-cn")
let designer = new GC.Spread.Sheets.Designer.Designer("designer-container")
spread = designer.getWorkbook()


import { convertSpjs2Gc } from "./Spjs2Gc.js"

sheet = spread.getActiveSheet()

let xhr = new XMLHttpRequest()
xhr.open("get", "/bbzy.sjs")
xhr.responseType = "blob"
xhr.onloadend = function () {
    spread.import(this.response, function () {
        
    })
}
xhr.send()

document.getElementById("btn").addEventListener("click", function () {
    convertSpjs2Gc(spread, "ds.data")
})